home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / basic / error.zip / EXAMPLE.BAS < prev    next >
BASIC Source File  |  1987-02-01  |  551b  |  20 lines

  1. option base 1:defint a-z:on error goto oops
  2.  
  3.  
  4.  
  5. main:
  6. '                        Body of program
  7.  
  8.  
  9.  
  10. oops:
  11. num = err
  12. reset                        'close open files
  13. open "R",#1,"error.dat",40   'open random access file with length of 40
  14. field #1, 40 as text$        'allocate 40 for buffer
  15. get #1,num                   'get record number which is same as error number
  16. Print "Error #";num          'print the error number
  17. print text$                  'and explanation
  18. close #1
  19. resume main                  'return to main body of program
  20.